const Tabs = function (tabList) {
  var that = [];
  tabList.forEach((item, index) => {
    let data = {
      "index": index,
      "title": item.title,
      "goodsList": []
    };
    item.goodsList.forEach((goods, _index) => {
      let _data = {
        "index": _index,
        "id": goods.id,
        "yanxuan_id": goods.yanxuan_id,
        "name": goods.name,
        "price": goods.price,
        "thumb": goods.thumb,
        "description": goods.description
      };
      data.goodsList.push(_data)
    })
    that.push(data)
  });
  return that;
};
module.exports = Tabs;
